/**
 * 
 */
package com.gite.nouette.admin.implementation.model;

import java.util.ArrayList;
import java.util.List;

import com.gite.nouette.admin.contract.model.ICommand;
import com.gite.nouette.admin.contract.model.IHandlerModule;

/**
 * @author Cyril
 * 
 */
public class HandlerModuleImpl extends AbstractModel implements IHandlerModule {
	private List<ICommand> commands = null;

	public HandlerModuleImpl() {
		setCommands(new ArrayList<ICommand>());
	}

	/**
	 * @return the commands
	 */
	public List<ICommand> getCommands() {
		return this.commands;
	}

	/**
	 * @param commands
	 *            the commands to set
	 */
	public void setCommands(List<ICommand> commands) {
		this.commands = commands;
	}

	@Override
	public boolean addCommand(ICommand command) {
		return getCommands().add(command);
	}

	@Override
	public boolean removeCommand(ICommand command) {
		return getCommands().remove(command);
	}
}
